#!/bin/bash

CONF=/etc/named/named.conf

if  [ "X$1" != "Xnotify" -a "X$1" != "Xno-notify" -o  $# -ne 1 ]; then
	echo -e "
		Usage: $(basename $0) no-notify|notify
"
	exit 1
fi	


if [ "X$1" == "Xnotify" ]; then
	/usr/xpg4/bin/sed -e 's/^[[:space:]]*\/\/[[:space:]]*START_OF_NOTIFY//' \
		 -e '/^[[:space:]].*END_OF_NO_NOTIFY[[:space:]]*$/s/^/\/\/ START_OF_NO_NOTIFY/' $CONF
else
	/usr/xpg4/bin/sed -e 's/^[[:space:]]*\/\/[[:space:]]*START_OF_NO_NOTIFY//' \
		 -e '/^[[:space:]].*END_OF_NOTIFY[[:space:]]*$/s/^/\/\/ START_OF_NOTIFY/' $CONF
fi
